package com.learning.springboot.springdataJpa.customJpa;

import com.learning.springboot.Thymeleaf.entity.Person;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.NoRepositoryBean;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.io.Serializable;

/**
 * Created by td on 2017/9/29.
 * //自定义Repository实现
 */
@NoRepositoryBean //指明当前接口不是我们领域类的接口
public interface CustomReposiroty<T,ID extends Serializable> extends PagingAndSortingRepository<T,ID>{ // 扩展PagingAndSortingRepository具备分业和排序的功能

   // public void doSomething(ID id);//要定义的操作方法

    Page<Person> findByCustom(Person t, Pageable pageable);


}
